<template>
  <div class="wrap">
    <div class="content" v-loading="loading">
      <h1 style="width: 100%; text-align: center; margin-bottom: 10px"> {{ title }}</h1>
      <div class="container" v-html="this.content">

      </div>
    </div>

  </div>

</template>
<script>


export default {
  data() {
    return {
      title: '',
      content: '',
      loading: false,
    }
  },
  mounted() {
    this.loading = true
    this.$http.get(`/article/info?id=${this.$route.query.id} `).then((res) => {
      if (res.data.code === 0) {
        this.title = res.data.data.title
        this.content = res.data.data.content
      } else {
        this.$message.error(res.data.msg);
      }
      this.loading = false
    });
  }
}
</script>
<style lang="scss" scoped>
    .content{
      padding: 20px;
      width: 80%;
      min-height:100vh;
      background-color: #fff;
    }
    .wrap{
      display: flex;
      justify-content: center;
    }

    ::v-deep em {
      font-style: italic;
    }
</style>
